<script>
import { cloud } from '@/framework/utils/request'
import areaData from './area.json'
import { listFistCate } from '@/api/mallApi/goods'
import { getMallInfoByMallCode, getMallInfoDetail } from '@/api/mallApi/refund'

export default {
  name: 'StoreInfo',
  data() {
    return {
      cardOneList: [],
      cardTwoList: [],
      cardThrList: [],
      bankImgList: [],
      businessLicenseList: [],
      taxRegistrationList: [],
      dialogImageUrl: '',
      dialogVisible: false,
      categoryList: [],
      activeNames: ['1', '2', '3', '4', '5', '6', '7'],
      uploadFileUrl: `${this.baseURL()}/sysFileInfo/upload?secretFlag=N&fileBucket=mall`,
      img: require('./avatar.png'),
      data: '',
      // 省份数据
      provinceList: [],
      // 城市数据
      cityList: [],
      // 区县数据
      countyList: [],
      formData: {
        mallInfoRequest: {
          // 会员名
          account: '',
          // 店主姓名
          shopkeeper: '',
          phone: '',
          birthday: '',
          gender: 0,
          mallName: '',
          // 结算周期
          billingPeriod: '',
          // 店铺标签
          tag: '',
          // 商品分类
          goodsCategory: '',
          // 税务登记号:
          tax: '',
          image: ''
        },
        // 寄件人
        adressRequest: {
          // 寄件人省份
          provice: '',
          // 城市
          city: '',
          // 区县
          county: '',
          // 详细地址
          details: '',
          // 邮政编码
          zipCode: ''
        },
        // 收件人
        receivingAddressRequest: {
          provice: '',
          // 城市
          city: '',
          // 区县
          county: '',
          // 详细地址
          details: '',
          // 邮政编码
          zipCode: ''
        },
        // 银行
        bankInfoRequest: {
          bankName: '',
          bankUserName: '',
          bankCard: '',
          bankAddress: '',
          bankUserPhone: '',
          bankUserCard: '',
          payType: '1'
        },
        // 店铺状态
        userCompanyRequest: {
          companyName: '',
          businessLicense: '',
          businessTermStart: '',
          businessTermEnd: '',
          companyPhone: '',
          companyAddress: ''
        },
        imgRequest: {
          idCardOne: '',
          idCardTwo: '',
          idCardThr: '',
          bankImg: '',
          businessLicense: '',
          taxRegistration: ''
        }
      },
      rules: {
        mallInfoRequest: {
          shopkeeper: [
            { required: true, message: '请输入店主姓名', trigger: 'blur' }
          ],
          phone: [
            { required: true, message: '请输入联系电话', trigger: 'blur' }
          ],
          idCard: [
            { required: true, message: '请输入身份证号', trigger: 'blur' }
          ],
          birthday: [
            { required: true, message: '请选择负责人生日', trigger: 'change' }
          ],
          gender: [
            { required: true, message: '请选择性别', trigger: 'change' }
          ],
          mallName: [
            { required: true, message: '请输入店铺名称', trigger: 'blur' }
          ],
          billingPeriod: [
            { required: true, message: '请选择结算周期', trigger: 'change' }
          ],
          tag: [
            { required: true, message: '请选择店铺标签', trigger: 'change' }
          ],
          goodsCategoryId: [
            { required: true, message: '请选择商品分类', trigger: 'change' }
          ],
          tax: [
            { required: true, message: '请输入税务登记号', trigger: 'blur' }
          ]
        },
        bankInfoRequest: {
          bankName: [
            { required: true, message: '请输入银行名称', trigger: 'blur' }
          ],
          bankUserName: [
            { required: true, message: '请输入持卡人姓名', trigger: 'blur' }
          ],
          bankNo: [
            { required: true, message: '请输入开户账号', trigger: 'blur' }
          ],
          bankAddress: [
            { required: true, message: '请输入银行地址', trigger: 'blur' }
          ],
          bankUserPhone: [
            { required: true, message: '请输入持卡人手机号', trigger: 'blur' }
          ],
          bankUserCard: [
            {
              required: true,
              message: '请输入持卡人身份证号',
              trigger: 'blur'
            }
          ],
          branchBank: [
            { required: true, message: '请输入分行名称', trigger: 'blur' }
          ]
        },
        adressRequest: {
          details: [
            { required: true, message: '请输入详细地址', trigger: 'blur' }
          ],
          zipCode: [
            { required: true, message: '请输入邮政编码', trigger: 'blur' }
          ],
          provice: [
            { required: true, message: '请选择省份', trigger: 'change' }
          ],
          city: [{ required: true, message: '请选择城市', trigger: 'change' }],
          county: [
            { required: true, message: '请选择区县', trigger: 'change' }
          ]
        },
        userCompanyRequest: {
          companyName: [
            { required: true, message: '请输入公司名称', trigger: 'blur' }
          ],
          companyAddress: [
            { required: true, message: '请输入公司地址', trigger: 'blur' }
          ],
          companyPhone: [
            { required: true, message: '请输入公司电话', trigger: 'blur' }
          ],
          businessLicense: [
            { required: true, message: '请输入营业执照号', trigger: 'blur' }
          ]
        },
        imgRequest: {
          idCardOne: [
            {
              required: true,
              message: '请上传店主身份证正面',
              trigger: 'blur'
            }
          ],
          idCardTwo: [
            {
              required: true,
              message: '请上传店主身份证反面',
              trigger: 'blur'
            }
          ],
          idCardThr: [
            {
              required: true,
              message: '请上传法人手持身份证',
              trigger: 'blur'
            }
          ],
          bankImg: [
            { required: true, message: '请上传银行开户证明', trigger: 'blur' }
          ],
          businessLicense: [
            { required: true, message: '请上传营业执照', trigger: 'blur' }
          ],
          taxRegistration: [
            { required: true, message: '请上传税务登记证', trigger: 'blur' }
          ],
          code: [
            {
              required: true,
              message: '请勾选我已同意并接受',
              trigger: 'blur'
            }
          ]
        },
        receivingAddressRequest: {
          details: [
            { required: true, message: '请输入详细地址', trigger: 'blur' }
          ],
          zipCode: [
            { required: true, message: '请输入邮政编码', trigger: 'blur' }
          ],
          provice: [
            { required: true, message: '请选择省份', trigger: 'change' }
          ],
          city: [{ required: true, message: '请选择城市', trigger: 'change' }],
          county: [
            { required: true, message: '请选择区县', trigger: 'change' }
          ]
        }
      }
    }
  },
  created() {
    /* getMallInfoDetail({})
      .then((res) => {})
      .catch((err) => {}) */
    this.getStore()
    // 筛选省份数据
    this.provinceList = areaData.map((item) => {
      return {
        value: item.value,
        label: item.label
      }
    })
    listFistCate().then((res) => {
      if (res.code === '00000') {
        this.categoryList = res.data
        // 生成一个只有 key和value 的数组
        this.categoryList = res.data.map((item) => {
          return {
            key: item.id,
            value: item.categoryName
          }
        })
      }
    })
  },
  methods: {
    baseURL() {
      return process.env.VUE_APP_BASE_API + cloud.file
    },
    handleRemove(file, fileList) {},
    handleAvatarSuccess(res, file) {
      this.formData.mallInfoRequest.image = file.response.data.fileUrl
    },
    handleProvinceChange(val) {
      if (!val) return
      // 筛选城市数据
      this.cityList = areaData
        .find((item) => item.value === val)
        .children.map((item) => {
          return {
            value: item.value,
            label: item.label
          }
        })
    },
    handleCityChange(val) {
      if (!val) return
      // 筛选区县数据
      this.countyList = areaData
        .find((item) => item.value === this.formData.adressRequest.provice)
        .children.find((item) => item.value === val)
        .children.map((item) => {
          return {
            value: item.value,
            label: item.label
          }
        })
    },
    handleClearProvince() {
      this.cityList = []
      this.countyList = []
      this.formData.city = ''
      this.formData.county = ''
    },
    handleClearCity() {
      this.countyList = []
      this.formData.county = ''
    },
    getStore() {
      getMallInfoByMallCode({
        mallCode: this.$route.query.mallCode ? this.$route.query.mallCode : ''
      }).then((res) => {
        if (res.code === '00000') {
          this.formData.mallInfoRequest = res.data.mallInfoRequest
          this.formData.adressRequest = res.data.adressRequest
          this.formData.receivingAddressRequest =
            res.data.receivingAddressRequest
          this.formData.bankInfoRequest = res.data.bankInfoRequest
          this.formData.userCompanyRequest = res.data.userCompanyRequest
          this.formData.imgRequest = res.data.imgRequest
          this.cardOneList.push({ url: res.data.imgRequest.idCardOne })
          this.cardTwoList.push({ url: res.data.imgRequest.idCardTwo })
          this.cardThrList.push({ url: res.data.imgRequest.idCardThr })
          this.bankImgList.push({ url: res.data.imgRequest.bankImg })
          this.businessLicenseList.push({
            url: res.data.imgRequest.businessLicense
          })
          this.taxRegistrationList.push({
            url: res.data.imgRequest.taxRegistration
          })
        }
      })
    },
    handleCardOneSuccess(res, file, fileList) {
      this.formData.imgRequest.idCardOne = file.response.data.fileUrl
      this.cardOneList[0].url = file.response.data.fileUrl
    },
    handleCardTwoSuccess(res, file, fileList) {
      this.formData.imgRequest.idCardTwo = file.response.data.fileUrl
      this.cardTwoList[0].url = file.response.data.fileUrl
    },
    handleCardThreeSuccess(res, file, fileList) {
      this.formData.imgRequest.idCardThr = file.response.data.fileUrl
      this.cardThrList[0].url = file.response.data.fileUrl
    },
    handleBankImgSuccess(res, file, fileList) {
      this.formData.imgRequest.bankImg = file.response.data.fileUrl
      this.bankImgList[0].url = file.response.data.fileUrl
    },
    handleLicenseSuccess(res, file, fileList) {
      this.formData.imgRequest.businessLicense = file.response.data.fileUrl
      this.businessLicenseList[0].url = file.response.data.fileUrl
    },
    handleRegistrationSuccess(res, file, fileList) {
      this.formData.imgRequest.taxRegistration = file.response.data.fileUrl
      this.taxRegistrationList[0].url = file.response.data.fileUrl
    },
    handleCardOnePreview(file) {
      this.dialogImageUrl = file.url
      this.dialogVisible = true
    },
    handleExceedOne() {
      this.$message.error('请先删除，再上传新的照片')
    },
    handleExceedTwo() {
      this.$message.error('请先删除，再上传新的照片')
    },
    handleExceedThree() {
      this.$message.error('请先删除，再上传新的照片')
    },
    handleExceedFour() {
      this.$message.error('请先删除，再上传新的照片')
    },
    handleExceedFive() {
      this.$message.error('请先删除，再上传新的照片')
    },
    handleExceedSix() {
      this.$message.error('请先删除，再上传新的照片')
    }
  }
}
</script>

<template>
  <div class="storeInfo">
    <el-collapse v-model="activeNames">
      <el-collapse-item title="店铺标志" name="1">
        <el-upload
          style="margin-left: 100px"
          :action="uploadFileUrl"
          :on-remove="handleRemove"
          :on-success="handleAvatarSuccess"
          :show-file-list="false"
        >
          <img
            style="width: 150px; border-radius: 75px"
            v-if="img"
            :src="
              formData.mallInfoRequest.image
                ? formData.mallInfoRequest.image
                : img
            "
            class="avatar"
            alt="图片"
          />
          <!--          <i v-else class="el-icon-plus avatar-uploader-icon"></i>-->
        </el-upload>
      </el-collapse-item>
      <el-collapse-item title="基本信息" name="2">
        <div class="form">
          <el-form
            ref="form"
            label-position="right"
            label-width="100px"
            :model="formData"
            :rules="rules"
          >
            <el-form-item label="会员名:"></el-form-item>
            <el-form-item label="店主姓名:"></el-form-item>
            <el-form-item label="联系电话:" prop="mallInfoRequest.phone">
              <el-input
                v-model="formData.mallInfoRequest.phone"
                style="width: 260px"
                placeholder="请输入电话"
                clearable
              ></el-input>
            </el-form-item>
            <el-form-item label="负责人生日:" prop="mallInfoRequest.birthday">
              <el-date-picker
                style="width: 260px"
                v-model="formData.mallInfoRequest.birthday"
                type="date"
                placeholder="选择生日时间"
              >
              </el-date-picker>
            </el-form-item>
            <el-form-item label="性别:" prop="mallInfoRequest.gender">
              <!--性别-->
              <el-radio-group v-model="formData.mallInfoRequest.gender">
                <el-radio :label="1">男</el-radio>
                <el-radio :label="2">女</el-radio>
              </el-radio-group>
            </el-form-item>
            <el-form-item label="店铺名称" prop="mallInfoRequest.mallName">
              <el-input
                v-model="formData.mallInfoRequest.mallName"
                style="width: 260px"
                placeholder="请输入店铺名称"
                clearable
              ></el-input>
            </el-form-item>
            <el-form-item label="结算周期" prop="mallInfoRequest.billingPeriod">
              <el-select
                v-model="formData.mallInfoRequest.billingPeriod"
                style="width: 260px"
                clearable
                placeholder="请选择结算周期"
              >
                <el-option label="周结" value="1"></el-option>
                <el-option label="半月结" value="2"></el-option>
                <el-option label="月结" value="3"></el-option>
              </el-select>
            </el-form-item>
            <el-form-item label="店铺标签" prop="mallInfoRequest.tag">
              <!-- 选择框-->
              <el-select
                clearable
                v-model="formData.mallInfoRequest.tag"
                style="width: 260px"
                placeholder="请选择店铺标签"
              >
                <el-option label="美食" value="1"></el-option>
                <el-option label="服饰" value="2"></el-option>
                <el-option label="数码" value="3"></el-option>
                <el-option label="家居" value="4"></el-option>
                <el-option label="美妆" value="5"></el-option>
                <el-option label="母婴" value="6"></el-option>
                <el-option label="运动" value="7"></el-option>
                <el-option label="其他" value="8"></el-option>
              </el-select>
            </el-form-item>
            <el-form-item
              label="商品分类:"
              prop="mallInfoRequest.goodsCategoryId"
            >
              <el-select
                v-model="formData.mallInfoRequest.goodsCategoryId"
                style="width: 260px"
                clearable
                placeholder="请选择商品分类"
              >
                <el-option
                  v-for="item in categoryList"
                  :key="item.key"
                  :label="item.value"
                  :value="item.key"
                ></el-option>
              </el-select>
            </el-form-item>
            <el-form-item
              v-if="formData.mallInfoRequest.type === 2"
              label="税务登记号:"
              prop="mallInfoRequest.tax"
            >
              <el-input
                style="width: 260px"
                v-model="formData.mallInfoRequest.tax"
                clearable
                placeholder="请输入税务登记号"
              ></el-input>
            </el-form-item>
          </el-form>
        </div>
        <!-- /.form -->
      </el-collapse-item>
      <el-collapse-item title="寄件人地址" name="3">
        <div class="form">
          <el-form
            ref="form"
            :inline="true"
            label-position="right"
            label-width="100px"
            :model="formData"
            :rules="rules"
          >
            <el-form-item label="省份:" prop="adressRequest.province">
              <el-select
                v-model="formData.adressRequest.provice"
                style="width: 260px"
                clearable
                @change="handleProvinceChange"
                @clear="handleClearProvince"
                placeholder="请选择省份"
              >
                <el-option
                  v-for="item in provinceList"
                  :key="item.value"
                  :label="item.label"
                  :value="item.value"
                ></el-option>
              </el-select>
            </el-form-item>
            <el-form-item label="城市:" prop="adressRequest.city">
              <el-select
                v-model="formData.adressRequest.city"
                style="width: 260px"
                clearable
                placeholder="请选择城市"
                @clear="handleClearCity"
                @change="handleCityChange"
              >
                <el-option
                  v-for="item in cityList"
                  :key="item.value"
                  :label="item.label"
                  :value="item.value"
                ></el-option>
              </el-select>
            </el-form-item>
            <el-form-item label="区县:" prop="adressRequest.county">
              <el-select
                v-model="formData.adressRequest.county"
                style="width: 260px"
                clearable
                placeholder="请选择区县"
              >
                <el-option
                  v-for="item in countyList"
                  :key="item.value"
                  :label="item.label"
                  :value="item.value"
                ></el-option>
              </el-select>
            </el-form-item>
            <el-form-item label="详细地址:" prop="adressRequest.details">
              <el-input
                type="textarea"
                v-model="formData.adressRequest.details"
                style="width: 636px"
                placeholder="请输入详细地址"
                clearable
              ></el-input>
            </el-form-item>
            <el-form-item label="邮政编码:" prop="adressRequest.zipCode">
              <el-input
                v-model="formData.adressRequest.zipCode"
                style="width: 260px"
                clearable
                placeholder="请输入邮政编码"
              ></el-input>
            </el-form-item>
          </el-form>
        </div>
      </el-collapse-item>
      <el-collapse-item title="收件人地址" name="4">
        <div class="form">
          <el-form
            ref="form"
            :inline="true"
            label-position="right"
            label-width="100px"
            :model="formData"
            :rules="rules"
          >
            <el-form-item label="省份:" prop="receivingAddressRequest.province">
              <el-select
                v-model="formData.receivingAddressRequest.provice"
                style="width: 260px"
                clearable
                @change="handleProvinceChange"
                @clear="handleClearProvince"
                placeholder="请选择省份"
              >
                <el-option
                  v-for="item in provinceList"
                  :key="item.value"
                  :label="item.label"
                  :value="item.value"
                ></el-option>
              </el-select>
            </el-form-item>
            <el-form-item label="城市:" prop="receivingAddressRequest.city">
              <el-select
                v-model="formData.receivingAddressRequest.city"
                style="width: 260px"
                clearable
                placeholder="请选择城市"
                @clear="handleClearCity"
                @change="handleCityChange"
              >
                <el-option
                  v-for="item in cityList"
                  :key="item.value"
                  :label="item.label"
                  :value="item.value"
                ></el-option>
              </el-select>
            </el-form-item>
            <el-form-item label="区县:" prop="receivingAddressRequest.county">
              <el-select
                v-model="formData.receivingAddressRequest.county"
                style="width: 260px"
                clearable
                placeholder="请选择区县"
              >
                <el-option
                  v-for="item in countyList"
                  :key="item.value"
                  :label="item.label"
                  :value="item.value"
                ></el-option>
              </el-select>
            </el-form-item>
            <el-form-item
              label="详细地址:"
              prop="receivingAddressRequest.details"
            >
              <el-input
                type="textarea"
                v-model="formData.receivingAddressRequest.details"
                style="width: 636px"
                placeholder="请输入详细地址"
                clearable
              ></el-input>
            </el-form-item>
            <el-form-item
              label="邮政编码:"
              prop="receivingAddressRequest.zipCode"
            >
              <el-input
                v-model="formData.receivingAddressRequest.zipCode"
                style="width: 260px"
                clearable
                placeholder="请输入邮政编码"
              ></el-input>
            </el-form-item>
          </el-form>
        </div>
      </el-collapse-item>
      <el-collapse-item title="银行账户" name="5">
        <div class="form">
          <el-form
            ref="form"
            label-position="right"
            label-width="126px"
            :model="formData"
            :rules="rules"
          >
            <el-form-item label="银行名称:" prop="bankInfoRequest.bankName">
              <el-input
                v-model="formData.bankInfoRequest.bankName"
                style="width: 260px"
                clearable
                placeholder="银行名称"
              ></el-input>
            </el-form-item>
            <el-form-item
              label="持卡人姓名:"
              prop="bankInfoRequest.bankUserName"
            >
              <el-input
                v-model="formData.bankInfoRequest.bankUserName"
                style="width: 260px"
                clearable
                placeholder="请输入持卡人姓名"
              ></el-input>
            </el-form-item>
            <el-form-item label="收款账号:" prop="bankInfoRequest.bankCard">
              <el-input
                v-model="formData.bankInfoRequest.bankCard"
                style="width: 260px"
                clearable
                placeholder="请输入收款账号"
              ></el-input>
            </el-form-item>
            <el-form-item label="银行地址:" prop="bankInfoRequest.bankAddress">
              <el-input
                v-model="formData.bankInfoRequest.bankAddress"
                style="width: 260px"
                clearable
                placeholder="请输入银行地址"
              ></el-input>
            </el-form-item>

            <el-form-item
              label="持卡人手机号:"
              prop="bankInfoRequest.bankUserPhone"
            >
              <el-input
                v-model="formData.bankInfoRequest.bankUserPhone"
                style="width: 260px"
                clearable
                placeholder="请输入持卡人手机号"
              ></el-input>
            </el-form-item>
            <el-form-item
              label="持卡人身份证号:"
              prop="bankInfoRequest.bankUserCard"
            >
              <el-input
                v-model="formData.bankInfoRequest.bankUserCard"
                style="width: 260px"
                clearable
                placeholder="请输入持卡人身份证号"
              ></el-input>
            </el-form-item>
          </el-form>
        </div>
      </el-collapse-item>
      <el-collapse-item
        v-if="formData.mallInfoRequest.type === 2"
        title="店铺状态"
        name="6"
      >
        <div class="form">
          <el-form
            ref="form"
            label-position="right"
            label-width="126px"
            :model="formData"
            :rules="rules"
          >
            <el-form-item
              label="公司名称:"
              prop="userCompanyRequest.companyName"
            >
              <el-input
                v-model="formData.userCompanyRequest.companyName"
                style="width: 260px"
                clearable
                placeholder="请输入公司名称"
              ></el-input>
            </el-form-item>
            <el-form-item
              label="营业执照:"
              prop="userCompanyRequest.businessLicense"
            >
              <el-input
                v-model="formData.userCompanyRequest.businessLicense"
                style="width: 260px"
                clearable
                placeholder="请输入营业执照"
              ></el-input>
            </el-form-item>
            <el-form-item
              label="营业期限:"
              prop="userCompanyRequest.businessTerm"
            >
              <el-date-picker
                style="width: 260px"
                v-model="formData.userCompanyRequest.businessTermStart"
                type="date"
                placeholder="开始时间"
              >
              </el-date-picker>
              <el-date-picker
                style="width: 260px"
                v-model="formData.userCompanyRequest.businessTermEnd"
                type="date"
                placeholder="结束时间"
              >
              </el-date-picker>
            </el-form-item>
            <el-form-item
              label="公司电话:"
              prop="userCompanyRequest.companyPhone"
            >
              <el-input
                v-model="formData.userCompanyRequest.companyPhone"
                style="width: 260px"
                clearable
                placeholder="请输入公司电话"
              ></el-input>
            </el-form-item>
            <el-form-item
              label="公司地址:"
              prop="userCompanyRequest.companyAddress"
            >
              <el-input
                v-model="formData.userCompanyRequest.companyAddress"
                style="width: 260px"
                clearable
                placeholder="请输入公司地址"
              ></el-input>
            </el-form-item>
          </el-form>
        </div>
      </el-collapse-item>
      <el-collapse-item title="必要证件" name="7">
        <div class="form">
          <el-form
            ref="form"
            label-position="right"
            label-width="126px"
            :model="formData"
            :rules="rules"
          >
            <el-form-item label="身份证正面:" prop="imgRequest.idCardOne">
              <el-upload
                list-type="picture-card"
                :action="uploadFileUrl"
                :file-list="cardOneList"
                v-model="formData.imgRequest.idCardOne"
                :on-preview="handleCardOnePreview"
                :on-success="handleCardOneSuccess"
                :limit="1"
                :on-exceed="handleExceedOne"
              >
                <i class="el-icon-plus"></i>
              </el-upload>
            </el-form-item>
            <el-form-item label="身份证反面:" prop="imgRequest.idCardTwo">
              <el-upload
                list-type="picture-card"
                :file-list="cardTwoList"
                :action="uploadFileUrl"
                :on-remove="handleRemove"
                :on-success="handleCardTwoSuccess"
                :on-exceed="handleExceedTwo"
                :limit="1"
              ><i class="el-icon-plus"></i>
              </el-upload>
            </el-form-item>
            <el-form-item label="手持身份证:" prop="imgRequest.idCardThr">
              <el-upload
                list-type="picture-card"
                :file-list="cardThrList"
                :action="uploadFileUrl"
                :on-remove="handleRemove"
                :on-success="handleCardThreeSuccess"
                :on-exceed="handleExceedThree"
                :limit="1"
              ><i class="el-icon-plus"></i>
              </el-upload>
            </el-form-item>
            <el-form-item label="银行卡照片:" prop="imgRequest.bankImg">
              <el-upload
                list-type="picture-card"
                :file-list="bankImgList"
                :action="uploadFileUrl"
                :on-remove="handleRemove"
                :on-success="handleBankImgSuccess"
                :on-exceed="handleExceedFour"
                :limit="1"
              ><i class="el-icon-plus"></i>
              </el-upload>
            </el-form-item>
            <el-form-item
              v-show="formData.mallInfoRequest.type === 2"
              label="营业执照:"
              prop="imgRequest.businessLicense"
            >
              <el-upload
                list-type="picture-card"
                :file-list="businessLicenseList"
                :action="uploadFileUrl"
                :on-remove="handleRemove"
                :on-success="handleLicenseSuccess"
                :on-exceed="handleExceedFive"
                :limit="1"
              >
                <i class="el-icon-plus"></i>
              </el-upload>
            </el-form-item>
            <el-form-item
              v-show="formData.mallInfoRequest.type === 2"
              label="税务登记证 :"
              prop="imgRequest.taxRegistration"
            >
              <el-upload
                list-type="picture-card"
                :file-list="taxRegistrationList"
                :action="uploadFileUrl"
                :on-remove="handleRemove"
                :on-success="handleRegistrationSuccess"
                :on-exceed="handleExceedSix"
                :limit="1"
              >
                <i class="el-icon-plus"></i>
              </el-upload>
            </el-form-item>
          </el-form>
        </div>
      </el-collapse-item>
    </el-collapse>
    <el-dialog :visible.sync="dialogVisible">
      <img width="100%" :src="dialogImageUrl" alt="" />
    </el-dialog>
  </div>
</template>

<style scoped lang="scss">
.storeInfo {
  width: 98%;
  min-height: 750px;
  margin-top: 1%;
  margin-bottom: 1%;
  margin-left: 1%;
  background-color: #fff;
  overflow: hidden;
  padding: 0 20px;

  .form {
    margin-left: 80px;
  }
}
</style>
